package cn.bytest.netty.exchange;

import cn.bytest.netty.NettyTransporter;
import cn.bytets.rpc.api.Transporters;
import cn.bytets.rpc.api.exchange.ExchangeClient;
import cn.bytets.rpc.api.exchange.Exchanger;
import cn.bytets.rpc.common.URL;

public class NettyExchanger implements Exchanger {

    @Override
    public ExchangeClient connect(URL url) {
        return new NettyExchangeClient(Transporters.getInstance().setTransporters(new NettyTransporter(url)).connect(url));
    }
}
